home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 23 / Amiga Format AFCD23 (Feb 1998, Issue 107).iso / -seriously_amiga- / shareware / programming / c / c_lib / clib37x.readme < prev    next >
Text File  |  1997-12-06  |  13KB  |  275 lines

  1. Short:    Example.library in 100% C (SAS/Storm/Maxon/GCC/...)
  2. Author:   Andreas R. Kleinert, Helmut Hummel, Stefan Fuchs, Aaron Digulla, Gunther Nikl, Patrizio Biancalani
  3. Uploader: Andreas_Kleinert@t-online.de
  4. Type:     dev/c
  5.  
  6.  
  7.   example.library V37.20 (02.12.97)
  8.  
  9.   An Amiga shared library in 100 % C language - coming with sources.
  10.  
  11.   Compiler Checklist:        Compiler           Support
  12.                              -------------------------------
  13.    (see README.<compiler>    SAS/C 6.5x         yes
  14.     for more information)    MaxonC 3.x         yes
  15.                              StormC 2.x         yes
  16.                              DICE 3.x           (not tested, but likely)
  17.                              GCC 2.7.2.1        yes
  18.                              AztecC             (not tested)
  19.                              vbcc               yes
  20.  
  21.   OS Checklist:              Operating Sustem   Support
  22.                              -------------------------------
  23.                              Amiga OS 37-40     yes
  24.                              AROS 1.x           yes (AROS source tree)
  25.  
  26.  
  27.   Original SAS/C and StormC version (C) 1996-97 by Andreas R. Kleinert,
  28.   MaxonC version changes done 1996 by Helmut Hummel.
  29.   GCC version changes done 1997 by Stefan Fuchs and Gunter Nikl.
  30.   AROS source tree done 1997 by Aaron Digulla.
  31.   VBCC version changes done 1997 by Patrizio Biancalani.
  32.   All rights reserved.
  33.   ----------------------------------------------------------------------
  34.   This sample library intends to make Amiga shared library sources
  35.   compileable with any available Amiga C compiler - without any
  36.   changes to the source code.
  37.   And maybe in the future also running under any Amiga compatible
  38.   operating system with any CPU.
  39.  
  40.   The first goal seams to be easily done: nearly any noticeable compiler
  41.   for the Amiga does support generation of libraries by special
  42.   linker commands and pre-generated object files.
  43.  
  44.   But when looking into the details, one will find out, that these
  45.   linker functionality just reduces the influence of the programmer
  46.   on how his sources are handled, that the pre-generated object
  47.   files just originally were done in Assembler, and that each compiler
  48.   does define its own interface definitions and usage rules.
  49.  
  50.   But as a programmer, it is important to have control over the _complete_
  51.   source code and to be able to compile it _anywhere_ with only
  52.   minor changes, even better without any changes.
  53.  
  54.   Since most Amiga system modules - noticeable Libraries, Devices and
  55.   Resources - do have startup-modules and other larger parts completely
  56.   written in Assembler language, the most important task for getting
  57.   inter-compiler and operating system independant sources in my opinion
  58.   is, to completely migrate the interfaces to C language (but different
  59.   to AROS, for example, it is most important, to keep the sources running
  60.   under the current 68k AmigaOS in the _first_ place).
  61.  
  62.   This goal basically has been reached already, still missing of
  63.   course are some of the less Amiga-native compilers and of course
  64.   tests with any kind of "AmigaOS for PowerPC".
  65.  
  66.   But since Assembler is nearly as portability-hostile as BCPL _today_
  67.   we may come quite close to the goal defined above by just moving
  68.   towards C.
  69.  
  70.   Translate your 68k-assembler library startup-codes smartly
  71.   to C by simply using this source-code as an advice how to do it.
  72.  
  73.   For testing: install the (re)compiled example.library to LIBS: and
  74.   start the test program - it should pop up a requester, then.
  75.  
  76.   If you can submit adjustments for the other compilers as mentioned
  77.   above: feel free to send these.
  78.   ---
  79.   Feel free to use this source for own projects.
  80.  
  81.   It is allowed to be spread and distributed anywhere, as far
  82.   as my consent is concerned.
  83.  
  84.   Amiga International, or the current owner of the technologie,
  85.   is allowed to always put this source on their newest
  86.   Developer CD-ROM.
  87.  
  88.   Thanks and credits will always be appreciated - for example,
  89.   you MAY, but NEED NOT:
  90.   give me credits in your program's docs, send me keyfiles for
  91.   your programs using the library, and so on.
  92.   But that's simply voluntarily.
  93.  
  94.    _________________________________________________________
  95.   |      You may reach me the following way.                |
  96.   |    Send bug-reports, money or whatever to:              |
  97.   |---------------------------------------------------------|
  98.   |        * SuperView Development & Registration *         |
  99.   |          * DRAFU Development & Registration *           |
  100.   |       * Image Engineer Registration Site Europe *       |
  101.   |                                                         |
  102.   |                                                         |
  103.   |                  PerSuaSiVe SoftWorX                    |
  104.   |                                                         |
  105.   |                  Andreas R. Kleinert                    |
  106.   |                  Sandstrasse 1                          |
  107.   |                  D-57072 Siegen                         |
  108.   |                  Germany, Europe                        |
  109.   |                                                         |
  110.   | Any snail mail to the old address will still be routed. |
  111.   |                                                         |
  112.   |                  Phone:  +49-271-22869 also FAX + AM    |
  113.   |                          +49-271-22838                  |
  114.   |                                                         |
  115.   |                  Weekdays after 17.00h.                 |
  116.   |                                                         |
  117.   |         When calling via phone you may leave a message, |
  118.   |         if I'm not available - but don't expect me      |
  119.   |         calling back to USA, Australia, ... since       |
  120.   |         german phone rates are HIGHLY expensive.        |
  121.   |_________________________________________________________|
  122.  
  123.     http://home.t-online.de/home/Andreas_Kleinert/
  124.  
  125.   eMail:
  126.  
  127.         Please send binaries via ARK@COB.wwbnet.de, and keep
  128.         them smaller than 16 KB. Please think twice before
  129.         sending them - my postbox is not unlimited in size.
  130.  
  131.            - Fido    Andreas Kleinert 2:2457/350.18
  132.            - Usenet
  133.                      Andreas_Kleinert@superview.ftn.neckar-alb.de (Fido-Gate)
  134.                      Andreas_Kleinert@t-online.de                 (T-Online)
  135.                      ARK@COB.wwbnet.de                            (Z-Netz)
  136.                      ARK@amigaworld.com                           (AmigaWorld)
  137.  
  138.            - If nothing else works, try one of these public
  139.              Fido-Usenet gateways:
  140.  
  141.                In Germany:
  142.                  Andreas_Kleinert@p18.f350.n2457.z2.fido.sub.org
  143.  
  144.                From USA or elsewhere:
  145.                  Andreas_Kleinert@p18.f350.n2457.z2.fidonet.org
  146.  
  147.  
  148.  Known Bugs:        - some versions of DOpus and all Installer versions
  149.                       can't fetch the version information from the
  150.                       library binary due to some bugs in their code.
  151.                       Newer DOpus versions have this fixed and C:Version
  152.                       for example did that task always.
  153.  
  154.  
  155.  History:
  156.  
  157.  V37.20 (02.12.97): - added VBCC support, done by Patrizio Biancalani
  158.                       <P.Biancalani@agora.stm.it>
  159.  
  160.  V37.17 (24.10.97): - updated "ReadMe_MAXON" and added a bug-description
  161.                       (plus workaround) as supplied by Stephan Rupprecht
  162.                       <Rupprecht_Verwertung@t-online.de>
  163.  
  164.  V37.16 (23.8.97) : - V37.15 - frozen AROS spin-off
  165.                     - AROS-Version now included with AROS package, separately
  166.                     - added comments about Forbid/Permit/Wait/single-threading
  167.                       to the Library access functions
  168.                     - also commented the rest a little bit
  169.                       (-> maybe some certain people from comp.sys.amiga.programmer
  170.                           now feel better - but then again... maybe not ;)
  171.  
  172.  V37.14 (13.8.97) : - AROS: - the LH1_ to LH2_ macro replacements in
  173.                               "compiler.h" had been wrongly defined
  174.                             - "BPTR" type only was available under AROS,
  175.                               now using "struct SegList *"
  176.                             - AROS version now does compile under AmigaOS
  177.                               with SAS/C 6.58, too
  178.                     - "APTR seglist" now "struct SegList *"
  179.  
  180.  V37.13 (19.7.97) : - GNU makefile had lost its TABs
  181.                       (-> Gunter Nikl)
  182.  
  183.  V37.12 (29.6.97) : - fixed memory bug-fix (argh)
  184.                       (-> Gunter Nikl)
  185.                     - changed/applied GCC adjustments
  186.                       (-> diffs by Gunter Nikl)
  187.  
  188.  V37.11 (24.6.97) : - added "known bugs" section
  189.                     - LibInit now delocates library base on error
  190.                       (NULL return)
  191.                       (-> Gunter Nikl)
  192.                     - added AROS version, and created an additional
  193.                       source tree for it, since I did not get it compiled
  194.                       with SAS/C 6.57 and there's perhaps additional
  195.                       #ifdef stuf to be done. Anyone likes to merge these ?
  196.                       (-> Aaron Digulla)
  197.  
  198.  V37.10 (6.4.97) :  - added GCC version by Stefan Fuchs, snfuchs@sokrates.franken.de.
  199.                       Thanks !
  200.                     - some small changes to docs, includes and comments
  201.                     - still missing: DICE, Aztec, vbcc. Who does it ?
  202.                     - fixed ftn email address
  203.  
  204.  V37.6 (27.3.97) :  - finetuning
  205.  
  206.  V37.5 (24.1.97) :  - rewrote docs
  207.                     - added basic support for compiler independent
  208.                       register naming and SAS/C keyword replacements
  209.                       (compiler.h). Thus sources now should be easily
  210.                       adaptable for GCC as well.
  211.  
  212.  V37.4 (8.1.97) :   - added FD file
  213.                     - added new pragma file (and dir) as
  214.                       include/pragma/example_lib.h
  215.                       which works with Aztec, Maxon, Storm,
  216.                       DICE and SAS C compilers.
  217.                       Thanks to fd2pragma and Dirk Stoecker.
  218.                     - some fixes to the readme files
  219.                     - updated eMail list
  220.  
  221.  V37.3 (3.1.97) :   - slightly changed SCOPTIONS
  222.                     - fixed some style things (APTR and library casts)
  223.                     - changed note about library opening at L_OpenLibs()
  224.                     - now compileable with StormC 2.0 as well
  225.                       (not tested with 1.1) - see readme file for StormC
  226.                     - added project file for StormC 2.0, smakefile still
  227.                       present - select, which one you'd like to use
  228.  
  229.  V37.2 (12.12.96) : - applied some more changes and fixes
  230.                       (-> suggested by Helmut Hummel)
  231.                     - added icons
  232.                       (-> from Helmut Hummel)
  233.  
  234.  V37.1 (4.12.96) : - bumped version to V37
  235.                    - added MaxonC 3.x version by applying changes
  236.                      to the SAS/C sources and adding Maxon
  237.                      specific make and configuration files
  238.                      (-> all done by Helmut Hummel, see Readme.MAXON)
  239.                    - added StormC support
  240.                    - yet missing: DICE, Aztec, GNU. Who does it ?
  241.  
  242.  V1.4 (30.11.96) : - added SAS/C specific Ctrl-C disabling code
  243.                    - made some workarounds compiler sensitive
  244.                    - redone all with SAS/C V6.57
  245.                    - 944 Bytes ;-)
  246.  
  247.  V1.3 (13.9.96) :  - when starting lib as executable, -1 must be returned
  248.                    - now caching SysBase
  249.                    - added some comments, where changes should not
  250.                      be applied
  251.                    - added note about sharing library bases
  252.                    - documented and modified sample function,
  253.                      so that correct a0/a1/d0/d1 and a6 usage becomes
  254.                      more obviously and verbose
  255.                    - still 940 bytes ;-)
  256.  
  257.  V1.2 (5.9.96)  :  - fixed some things resulting out of a
  258.                      discussion in Z-Netz
  259.  
  260.  V1.1 (1.9.96)  :  - small changes in style
  261.                      (only bumped versions of changed modules):
  262.                        o moved "examplebase.h" to include/example/
  263.                          (so also adjusted LibInit.c, StartUp.c
  264.                           and SCOPTIONS for reflecting that)
  265.                        o SampleFuncs.h did contain wrong prototype
  266.                          (did not matter, since only used for
  267.                           ULONG function table within StartUp.c)
  268.                        o explicitely __aligned ROMTag structure
  269.  
  270.  V1.0 (14.8.96) : - first release
  271.  
  272.  
  273.  ---
  274.  All mentioned trademarks are subject to their owners.
  275.